﻿<% @ Page Language="C#" MasterPageFile="~/MasterPage.master" CodeFile="Stock.aspx.cs" Inherits="Stock" Title="侦听股票信息" %>
<% @ MasterType VirtualPath="~/MasterPage.master" %>


<asp:Content ID="Content1" ContentPlaceHolderID="Content1" Runat="Server">
                <script type="text/javascript" src="http://i0.sinaimg.cn/dy/deco/2010/0527/headcj.js"></script>
                <div style="margin-top : 30px; width : 100%">
                    <div style="z-index: 107; margin-left : 0; float : left; width : auto">
                        <asp:Image ID="Image2" ImageUrl="./Pics/stock.jpg" runat="server" />
                    </div>
                    <div style="z-index: 107; margin-left : 0; float : left; width : auto">
                        <h3>股票信息侦听</h3>
                    </div>
                </div>

                <div style="margin-top : 30px; float : left; width : 100%">
                    <div style="margin-top : 10px auto; width : 100%">
                    我们会在您设定的条件满足时，给您发短信（每只股票每月消耗积分：<b>2</b>）（<a href="./HowToSet139.aspx" >帮助？</a>）：
                    </div>
                    <div style="z-index: 107; margin-top : 20px; float : left;width : 100%; height : 25px">
                        <div style="z-index: 107; margin-left : 0; float : left; width : auto">我要侦听股票</div>
                        <div style="z-index: 107; margin : 0 auto; float : left; width : 90px">
                            <asp:Textbox ID="StockIDTextbox" text="拼音/代码/名称" style="z-index: 107; margin : 0 auto; float : left; width : 100%" runat="server">
                            </asp:Textbox>
                        </div>
                        <script type="text/javascript">
                            var suggestServer_0 = new SuggestServer();
                            suggestServer_0.bind({
                                "input": "<%=StockIDTextbox.ClientID%>",
                                "default": "拼音/代码/名称",
                                "type": "stock",
                                "width": 350,
                                "link": "",
                                "head": ["选项", "代码", "中文名称"],
                                "body": [-1, 2, 4],
                                "callback": null
                            });
		                </script>
                    <div style="z-index: 107; margin-left : 10px; float : left; width : auto">当价格大于</div>
                    <div style="z-index: 107; float : left; width : 40px">
                        <asp:Textbox ID="Textbox1" Text="100.00" style="z-index: 107; margin : 0 auto; float : left; width : 100%" runat="server">
                        </asp:Textbox>
                    </div>
                    
                    <div style="z-index: 107; margin-left : 10px; float : left; width : auto">元或小于</div>
                    <div style="z-index: 107; float : left; width : 40px">
                        <asp:Textbox ID="Textbox2" Text="10.00" style="z-index: 107; margin : 0 auto; float : left; width : 100%" runat="server">
                        </asp:Textbox>
                    </div>
                    <div style="z-index: 107; margin-left : 10px; float : left; width : auto">元时，给我发送短信</div>

                    <asp:Button ID="Button3" runat="server" Text="确定" class="btn-submit2 enabled2"
                        Font-Bold="True" Font-Size="Medium" OnClick="Button3_Click"  />
                     </div>
                </div>

               <div style="float : left; margin-top : 30px; width : 100%">
                <div style="margin-top : 10px auto; width : 100%">
                您已经关注的服务，您可以修改他们：
                </div>
                <asp:ListView ID="ListView"
                    DataSourceID="objService"
                    onitemupdating="ListView1_ItemUpdating"
                    OnItemDeleting="ListView1_ItemDeleting"
                    OnItemCommand = "ListView1_ItemCommand"
                    runat="server">
                    <LayoutTemplate>
                      <table cellpadding="2" class="datasheet datatable excel2007" width="640px" border="1" runat="server" id="tblProducts">
                        <tr id="Tr1" class="first" runat="server">
                          <th id="Th3" runat="server">#</th>
                          <th id="Th1" runat="server">股票代码</th>
                          <th id="Th5" runat="server">股票名称</th>
                          <th id="Th2" runat="server">价格上限</th>
                          <th id="Th4" runat="server">价格下限</th>
                        </tr>
                        <tr runat="server" id="itemPlaceholder" />
                      </table>
                      <asp:DataPager runat="server" ID="DataPager" PageSize="12">
                        <Fields>
                          <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowLastPageButton="true"
                            FirstPageText="|&lt;&lt; " LastPageText=" &gt;&gt;|"
                            NextPageText=" &gt; " PreviousPageText=" &lt; " />
                        </Fields>
                      </asp:DataPager>
                    </LayoutTemplate>
                    <ItemTemplate>
                      <tr id="Tr2" runat="server">
                        <th class="first" style="white-space:nowrap">
                          <asp:LinkButton ID="DeleteButton" runat="Server" Text="取消侦听" CommandName="Delete" />
                        </th>
                        <td>
                          <asp:Textbox ID="IdTextBox" runat="Server" enabled= "false" AutoPostBack="true" Text ='<%#Bind("StockId") %>' >
                          </asp:Textbox>
                        </td>
                        <td>
                          <asp:Textbox ID="NameTextBox" runat="Server" enabled= "false" AutoPostBack="true" Text ='<%#Bind("StockName") %>' >
                          </asp:Textbox>
                        </td>
                        <td>
                          <asp:Textbox ID="HighPriceTextBox" runat="Server" AutoPostBack="true" Text ='<%#Bind("HighPrice") %>' >
                          </asp:Textbox>
                        </td>
                        <td>
                          <asp:Textbox ID="LowPriceTextBox" runat="Server" AutoPostBack="true" Text ='<%#Bind("LowPrice") %>' >
                          </asp:Textbox>
                        </td>
                      </tr>
                    </ItemTemplate>
            </asp:ListView>
            <asp:ObjectDataSource ID="objService" runat="server" TypeName="StockService"
                SelectMethod="Select" UpdateMethod="Update" DeleteMethod="Delete" 
                onobjectcreating="objService_ObjectCreating">      
            </asp:ObjectDataSource>
            <p><asp:Label ID="Label2" runat="server" Text=""></asp:Label></p>
            
            <asp:Button ID="Button4" runat="server" Text="保存我的改动" class="btn-submit enabled"
                                Font-Bold="True" Font-Size="Medium" OnClick="Button4_Click"  />
            </div>

            <div style="z-index: 107; margin-top : 60px; float : left; width : 100%">
      <table style="margin-left : 0; float : left; width : 100%">
        <tr>
          <td>
           其他服务：
          </td>
          <td id="Th3" runat="server">
             <a href="./AppleStore.aspx" title= "苹果商店监测"><asp:Image ID="Image1" ImageUrl="./Pics/stock.jpg" runat="server" />
             </a>
           </td>
           <td id="Th1" runat="server">
             <a href="./QQOnline.aspx" title= "QQ在线侦听服务"><asp:Image ID="Image3" ImageUrl="./Pics/qq.jpg" runat="server" />
             </a>
           </td>
           <td id="Th2" runat="server">
             <a href="./weather.aspx" title= "天气预报"><asp:Image ID="Image4" ImageUrl="./Pics/weather.gif" runat="server" />
             </a>
           </td>
        </tr>
        <tr>
          <td></td>
          <td id="Td1" runat="server">
             <a href="./AppleStore.aspx" title= "苹果商店监测">苹果商店监测
             </a>
           </td>
           <td id="Td2" runat="server">
             <a href="./QQOnline.aspx" title= "QQ在线侦听服务">QQ在线侦听
             </a>
           </td>
           <td id="Td3" runat="server">
             <a href="./weather.aspx" title= "天气预报">天气预报
             </a>
           </td>
        </tr>
       </table>
      <div style="z-index: 107; margin-left : 0; float : left; width : 100%">
         <div style="z-index: 107; margin-top : 30px; float : left; width : 100%">
                 分享到：
                <div id="jiathis_style_32x32">
	                <a class="jiathis_button_tsina"></a>
	                <a class="jiathis_button_tqq"></a>
                    <a class="jiathis_button_qzone"></a>
	                <a class="jiathis_button_renren"></a>
	                <a class="jiathis_button_kaixin001"></a>
                    <a class="jiathis_button_douban"></a>
                    <a class="jiathis_button_tieba"></a>
                    <a class="jiathis_button_thexun"></a>
                    <a class="jiathis_button_51"></a>
                    <a class="jiathis_button_t163"></a>
                    <a class="jiathis_button_tsohu"></a>
                    <a class="jiathis_button_mop"></a>
                    <a class="jiathis_button_tianya"></a>
                    <a class="jiathis_button_fb"></a>
                    <a class="jiathis_button_msn"></a>
                    <a class="jiathis_button_twitter"></a>
                    <a class="jiathis_button_hi"></a>
                    <a class="jiathis_button_zhuaxia"></a>
	                <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	                <a class="jiathis_counter_style"></a>
                </div>
                <script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8">
                </script>
                <script type="text/javascript">
                    var jiathis_config = {
                        url: "http://www.shuyixia.com/Stock.aspx",
                        title: "这个网站很不错哦，可以给我股票价格短信提醒。"
                    }
                </script>
      </div>
      </div>
</div>
</asp:Content>

